#!/bin/bash
SCRIPT_PATH=$(readlink -f "$0")
# 获取当前脚本所在的目录
SCRIPT_DIR=$(dirname "$SCRIPT_PATH")
echo "当前脚本的绝对路径是: $SCRIPT_PATH"
echo "当前脚本所在的目录是: $SCRIPT_DIR"
apt-get update
apt-get install aria2 -y
cp format /usr/local/bin/
chmod a+x /usr/local/bin/format
# # 下载hf-mirror专用的下载脚本
wget https://hf-mirror.com/hfd/hfd.sh
cp hfd.sh /usr/local/bin/
chmod a+x /usr/local/bin/hfd.sh
# # 把hf镜像追加到~/.bashrc
# 增加一些喜欢的命令
echo "alias hfd='/usr/local/bin/hfd.sh'" >> ~/.bashrc
echo 'alias nvw="watch -n 1 nvidia-smi"' >> ~/.bashrc
echo "export HF_ENDPOINT=https://hf-mirror.com" >> ~/.bashrc
echo 'alias c="clear"' >> ~/.bashrc
alias 'gs="git status"'>> ~/.bashrc
alias 'gdss="git diff --shortstat"' >> ~/.bashrc
source ~/.bashrc